package com.wtf.service;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * desc:
 *
 * @author tengfei wang
 * @version 1.0
 * @date Created in 2/11/2020
 */
@Component
@FeignClient(name = "service-email", path = "/email", fallback = EmailFeignFallback.class)
public interface EmailFeignService {

    /**
     * send email
     * @param email 邮箱
     * @param code 验证码
     * @return 是否发送成功
     */
    @RequestMapping("/{email}/{code}")
    boolean sendEmail(@PathVariable("email") String email, @PathVariable("code") Integer code);
}
